package com.zxx.flowerstore.controller;

import org.json.JSONObject;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName HelloController
 * @Author Admin
 * @Date 2021/3/20 13:37
 * @Description HelloController
 * @Version 1.0
 */
@RestController
@RequestMapping("/hello")
@CrossOrigin
public class HelloController {

    @PostMapping("/hello")
    @ResponseBody
    public String hello(@RequestBody JSONObject jsonObject) {
        jsonObject.put("data","hello");
        return com.alibaba.fastjson.JSONObject.toJSONString(jsonObject);
    }

}
